﻿using AutoMapper;
using GoodShop.Sale;
using GoodShop.seckill;
using GoodShop.seckillRedis;
using GoodShop.ShopBrands;
using GoodShop.ShopCar;
using GoodShop.Shops;
using GoodShop.ShopType;
using GoodShop.SKUs;
using GoodShop.Users;

namespace GoodShop;

public class GoodShopApplicationAutoMapperProfile : Profile
{
    public GoodShopApplicationAutoMapperProfile()
    {
        /* You can configure your AutoMapper mapping configuration here.
         * Alternatively, you can split your mapping configurations
         * into multiple profile classes for a better organization. */
        CreateMap<CommodityInfo,ShopDTO>();
        CreateMap<CreateUpdateShopDTO, CommodityInfo>();

        CreateMap<CommodityInfo, ShopListDTO>();
     
        CreateMap<CommoditySpecifica, ShopbrandDTO>();
        CreateMap<CreateUpdateShopBrandDTO, CommoditySpecifica>();  
        
        CreateMap<UserModel, UserDTO>();
        CreateMap<CreateUpdateUsersDTO, UserModel>();

        CreateMap<CommodityType, ShopTypeDTO>();
        CreateMap<CreateUpdateShopTypeDTO, CommodityType>();

        CreateMap<SKUModel, SKUDTO>();
        CreateMap<CreateUpdateSKUDTO, SKUModel>();

        CreateMap<OrderInfo, OrderInfoDTO>();
        CreateMap<CreateUpdateOrderInfoDTO, OrderInfo>();

        CreateMap<ShoppingCar, ShoppingCarDTO>();
        CreateMap<CreateUpdateShoppingCarDTO, ShoppingCar>();

        CreateMap<SeckIll,seckillreadis >();
        CreateMap<CreateSeckill, SeckIll>();
    }
}
